<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<%-- <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>CSA</title>
		<link href="static/css/bootstrap/css/bootstrap.css" type="text/css" />
		<link href="static/css/bootstrap/css/bootstrap.min.css" type="text/css" />
		<link href="static/css/base.css" rel="stylesheet" type="text/css" />
		<link href="static/css/main.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    
    <jsp:include page="include/nav.jsp">
		<jsp:param value="library" name="menu"/>
		<jsp:param value="mirror" name="menusub"/>
	</jsp:include>
	
	<script type="text/javascript" src="static/js/jquery-2.2.1.min.js" ></script>
	<script type="text/javascript" src="static/css/bootstrap/js/bootstrap.min.js" ></script>
		
	</body>
</html>
 --%>
 <!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CAS - 首页</title>
<link href="static/css/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="static/css/base.css" rel="stylesheet" type="text/css" />
<link href="static/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="static/js/jquery-2.2.1.min.js"></script>
<script type="text/javascript" src="static/js/effects.js"></script>
<script type="text/javascript">
		
	
	$(document).ready(function() {
		
		$.ajax({
			type : 'post',
			dataType : 'json',
			url : 'findbyIpStatus',
			
			success : function(data) {
	
		/* 
			 var azfalse=data.IpStatus1[2].a
			 var yiaz =data.IpStatus1[3].a; 
			 var weian=data.IpStatus1[0].a;
			 var azzhong= data.IpStatus1[1].a;
		 	 var allaz=parseInt(azzhong)+parseInt(azfalse)+parseInt(yiaz)+parseInt(weian); */
			var dataIplength=data.IpStatus1.length;
			  for(var i=0;i<dataIplength;i++){
						if(dataIplength==1){
							// var weian=data.IpStatus1[0].a;
							 var allaz=data.IpStatus1[0].a;
							  $(".tr1").text(allaz);
						}
						 if(dataIplength==2&&data.IpStatus1[1].ipStatus=="4"){
							 var weian=data.IpStatus1[0].a;
							 var yiaz =data.IpStatus1[1].a; 
							 var allaz=parseInt(weian)+parseInt(yiaz);
							  $(".tr1").text(allaz);
						} else if(dataIplength==2&&data.IpStatus1[1].ipStatus=="2"){//安装中
							 var weian=data.IpStatus1[0].a;
							 var azzhong= data.IpStatus1[1].a;
							 var allaz=parseInt(weian)+parseInt(azzhong);
							  $(".tr1").text(allaz);
							  $(".tr2").text(azzhong);
						}else if(dataIplength==2&&data.IpStatus1[1].ipStatus=="3"){
							 var weian=data.IpStatus1[0].a;
							 var azfalse=data.IpStatus1[1].a
							 var allaz=parseInt(weian)+parseInt(azfalse);
							 $(".tr1").text(allaz);
							 $(".tr3").text(azfalse);
						}
						 if(dataIplength==3&&data.IpStatus1[1].ipStatus=="2"&&data.IpStatus1[2].ipStatus=="3"){
							 var weian=data.IpStatus1[0].a;
							 var azzhong= data.IpStatus1[1].a;
							 var azfalse=data.IpStatus1[2].a
							 var allaz=parseInt(weian)+parseInt(azfalse)+parseInt(azzhong);
							 $(".tr1").text(allaz);
							 $(".tr2").text(azzhong);
							 $(".tr3").text(azfalse);
						 }else if(dataIplength==3&&data.IpStatus1[1].ipStatus=="2"&&data.IpStatus1[2].ipStatus=="4"){
							 var weian=data.IpStatus1[0].a;
							 var azzhong= data.IpStatus1[1].a;
							 var yiaz =data.IpStatus1[2].a; 
							 var allaz=parseInt(weian)+parseInt(yiaz)+parseInt(azzhong);
							 $(".tr1").text(allaz);
							 $(".tr2").text(azzhong);
						 }else if(dataIplength==3&&data.IpStatus1[1].ipStatus=="3"&&data.IpStatus1[2].ipStatus=="4"){
							 var weian=data.IpStatus1[0].a;
							 var azfalse=data.IpStatus1[1].a
							 var yiaz =data.IpStatus1[2].a; 
							 var allaz=parseInt(weian)+parseInt(azfalse)+parseInt(yiaz);
							 $(".tr1").text(allaz);
							 $(".tr2").text(azzhong);
							 $(".tr3").text(azfalse);
						 }
						 if(dataIplength==4){
							 var weian=data.IpStatus1[0].a;
							 var azzhong= data.IpStatus1[1].a;
							 var azfalse=data.IpStatus1[2].a
							 var yiaz =data.IpStatus1[3].a; 
							 var allaz=parseInt(azzhong)+parseInt(azfalse)+parseInt(yiaz)+parseInt(weian);
							 $(".tr1").text(allaz);
							 $(".tr2").text(azzhong);
							 $(".tr3").text(azfalse);
						 }
								 
						 
				 } 
			   
			/*  var weifa=data.SchemeSyatus[0].c;
			 var yifa=data.SchemeSyatus[1].c;
			 var yizx=data.SchemeSyatus[3].c;
				 $(".trr1").text(weifa); 
				  $(".trr2").text(yifa); 
				   $(".trr3").text(yizx); */
				//  var abv=data.IsoType1[0].ISOTYPE;
			 var dataSchlength=data.SchemeSyatus.length;
				  for(var i=0;i<dataSchlength;i++){
					  if(dataSchlength==2&&data.SchemeSyatus[1].SCHEMESTATUS=="2"){
						  var yifa =data.SchemeSyatus[1].c;
						  $(".trr1").text(yifa); 
					  }else if(dataSchlength==2&&data.SchemeSyatus[1].SCHEMESTATUS=="3") {
						  var yizf=data.SchemeSyatus[1].c;
						  $(".trr3").text(yizf); 
					  }else if(dataSchlength==2&&data.SchemeSyatus[1].SCHEMESTATUS=="4"){
						  var yizx=data.SchemeSyatus[1].c;
						  $(".trr2").text(yizx); 
					  }
					  if(dataSchlength==3&&data.SchemeSyatus[1].SCHEMESTATUS=="2"&&data.SchemeSyatus[2].SCHEMESTATUS=="3"){
						  var yifa =data.SchemeSyatus[1].c;
						  var yizf=data.SchemeSyatus[2].c;
						  $(".trr1").text(yifa); 
						  $(".trr3").text(yizf); 
						  }else if(dataSchlength==3&&data.SchemeSyatus[1].SCHEMESTATUS=="2"&&data.SchemeSyatus[2].SCHEMESTATUS=="4"){
							  var yifa =data.SchemeSyatus[1].c;
							  var yizx=data.SchemeSyatus[2].c;
							  $(".trr1").text(yifa); 
							  $(".trr2").text(yizx); 	
						  }else if(dataSchlength==3&&data.SchemeSyatus[1].SCHEMESTATUS=="3"&&data.SchemeSyatus[2].SCHEMESTATUS=="4"){
							  var yizf=data.SchemeSyatus[1].c;
							  var yizx=data.SchemeSyatus[2].c;
							  $(".trr2").text(yizx); 	
							  $(".trr3").text(yizf); 
						  }
					  if(dataSchlength==4){
						  var yifa =data.SchemeSyatus[1].c;
						  var yizx=data.SchemeSyatus[3].c;
						  var yizf=data.SchemeSyatus[2].c;
						  $(".trr1").text(yifa); 
						  $(".trr2").text(yizx);
						  $(".trr3").text(yizf); 
					  }
				  }
				
				
		 
				  
				  
				  
//======================================================================================================				  
				  var a=parseInt(0);
				for(var i=0; i<data.IsoType1.length;i++){
					 a+= parseInt(data.IsoType1[i].b);
					 
				} 
					 $(".sumall").text(a);
			for(var i=0; i<data.IsoType1.length;i++){
				if(i==5){
					break;
				}else if(i<1){
			$("table:eq(1) tr:eq(0)").append("<td>"+data.IsoType1[i].ISOTYPE+"</td><td>"+data.IsoType1[i].b+"</td>");
				}else if(i<3){
			$("table:eq(1) tr:eq(1)").append("<td>"+data.IsoType1[i].ISOTYPE+"</td><td>"+data.IsoType1[i].b+"</td>");	
				}else {
			$("table:eq(1) tr:eq(2)").append("<td>"+data.IsoType1[i].ISOTYPE+"</td><td>"+data.IsoType1[i].b+"</td>");	
				}	
			 } 
       
		
			}
		});
      });
	
	
	function osbs() {
		 window
				.open(
						"index_osbs",
						"_blank",
						"height=800，width=300,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes,location=no,status=no,alwaysRaised=yes"); 
					
	}
</script>
</head>



<body>

<jsp:include page="include/nav.jsp">
		<jsp:param value="home" name="menu" />
		<jsp:param value="" name="menusub" />
</jsp:include> 
<!--header-->
<!-- <div class="header">
	<div class="nav">
        <h1 class="logo">Ultra-CSA</h1>
        <ul class="menu">
            <li class="current"><a href="index.html"><i></i>首页<s></s></a></li>
            <li><a href="OS1.html"><i></i>OS自动部署<s></s></a></li>
            <li><a href="autoyw.html"><i></i>自动运维<s></s></a></li>
            <li><a href="pzcj.html"><i></i>配置采集<s></s></a></li>
            <li><a href="IOS.html">软件及脚本库<s></s></a></li>
        </ul>
        <div class="user"><span>欢迎黄磊</span><span class="user_pic"><img src="static/img/user_pic.png" /></span></div>
    </div>
    <div class="menusub">
        <ul>
            <li>&nbsp;</li>
        </ul>
    </div>
</div> -->
<!--content-->
<div class="homepage">
	<div class="bodrad5 bg_white oszdbs">
        <h2 class="homeh2">OS自动布署</h2>
   
        <div class="oszdbscnt">
        	<div class="os_sort">
        	<ul>
            	<li class="current"><a href="JavaScript:void(0)" onclick="osbs()"><i class="ico_h1"></i>OS布署</a></li>
                <li><a href="/csa/installDetails" ><i class="ico_h2"></i>安装过程监控</a></li>
            </ul>
            </div>
            
            
            <div class="os_install">
            	<h3>OS安装概要</h3>
                <table cellpadding="0" cellspacing="0" border="0">
                	<tr>
                    	<td>累计装机数量：</td>
                        <td class="tr1">0</td>
                    </tr>
                    <tr>
                    	
                   	<td>当前安装中：</td>
                        <td class="tr2">0</td>
                    </tr>
                    <tr>
                    	<td>安装失败：</td>
                        <td class="tr3"><span class="red">0</span></td>
                    </tr>
                </table>
               
            </div>
            <div class="os_isogs">
            	<h3>ISO镜像概要</h3>
                <table cellpadding="0" cellspacing="0" border="0" class="isotb">
               	<tr>
               		<td >
               		总数量:
               		</td >
               		<td class="sumall">
               		0
               		</td>
                 
                    </tr>
                    <tr>
                    	
                    </tr>
                    <tr>
                    	
                    </tr> 
                </table>
            </div>
            <div class="os_install">
            	<h3>OS安装方案概要</h3>
                <table cellpadding="0" cellspacing="0" border="0">
                	<tr>
                    	<td>已发布：</td>
                        <td class="trr1">0</td>
                    </tr>
                    <tr>
                    	<td>已完成：</td>
                        <td class="trr2">0</td>
                    </tr>
                    <tr>
                    	<td>已作废：</td>
                        <td class="trr3">0</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div class="h_part2 clearfix">
        <div class="bodrad5 bg_white h_part2os fl">
            <h2 class="homeh2">OS自动布署</h2>
            <div class="oszdbscnt">
                <div class="os_sort">
                    <ul>
                        <li><a href="#"><i class="ico_h3"></i>安装文件</a></li>
                        <li><a href="#"><i class="ico_h4"></i>当天软件安装情况</a></li>
                    </ul>
                </div><div class="os_install">
                    <h3>软件模板概要</h3>
                    <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td width="35%">模板总数总数：</td>
                            <td width="20%">18</td>
                            <td width="20%">Oracle10：</td>
                            <td width="25%" class="tr">1</td>
                        </tr>
                        <tr>
                            <td>CAgent</td>
                            <td>9</td>
                            <td>Weblogic</td>
                            <td class="tr">5</td>
                        </tr>
                        <tr>
                            <td>Tomcat:</td>
                            <td>2</td>
                            <td>Patrol:</td>
                            <td class="tr">1</td>
                        </tr>
                    </table>
                </div>  
            </div>
        </div>
        
        <div class="bodrad5 bg_white h_part2os fr">
        	<h2>软件模板概要</h2>
        	<ul>
            	<li><a href="#"><i class="ico_h5"></i>添加采集指标</a></li>
                <li><a href="#"><i class="ico_h6"></i>添加运维主机</a></li>
                <li><a href="#"><i class="ico_h7"></i>剧本声明</a></li>
                <li><a href="#"><i class="ico_h8"></i>采集结果查看</a></li>
            </ul>
        </div>
        
    </div>
</div>

<!--footer-->
<div class="cas_foot"><span class="mr30">版权所有 © 2016</span>神州泰岳 UltraPower</div>


</body>
</html>
 
 